package oop11;

/**
 * @author oldliu
 * @since 1.0
 */
public class UsbHardDisk implements Usb3 {
    private String brand;
    private int cap;//容量，单位是G

    public UsbHardDisk(String brand, int cap) {
        this.brand = brand;
        this.cap = cap;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public int getCap() {
        return cap;
    }

    public void setCap(int cap) {
        this.cap = cap;
    }

    @Override
    public void highSpeedTransfer() {
        System.out.println(this.brand+"在高速传输数据。。。");
    }

    @Override
    public void plugin() {
        System.out.println(this.brand+"开始工作了");
    }

    @Override
    public void work() {
        System.out.println(this.brand+"在工作中，读写数据。。。");
    }

    @Override
    public void unplugin() {
        System.out.println(this.brand+"被移出，停止工作");
    }

    //重写powerOff

    @Override
    public void powerOff() {
        System.out.println("硬盘断了电源，数据写入防止丢失");
    }
}
